﻿<Window x:Class="Mosiac_Desktop.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Mosaic Desktop" Height="380" Width="427"
    WindowStyle="None"
    AllowsTransparency="True"
    HorizontalAlignment="Right"
          Closing="Window_Closing" StateChanged="OnStateChanged" IsVisibleChanged="OnIsVisibleChanged" ResizeMode="CanResizeWithGrip">
    <Grid>
        <Border Margin="0,0,0,0" BorderBrush="DarkBlue" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.504,1.5" StartPoint="0.504,0.03">
                    <GradientStop Color="#FF15396f"  Offset="0"/>
                    <GradientStop Color="#FF3172cd" Offset="0.567"/>
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="30"></RowDefinition>
                <RowDefinition Height="130"/>
                <RowDefinition Height="130"/>
                <RowDefinition Height="40"/>

            </Grid.RowDefinitions>

            <!--header-->
            <DockPanel Grid.Column="0" Grid.Row="0">
                <Label Content="Mosaic Desktop" FontSize="16" Foreground="White"></Label>
                <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="220,0,0,0">
                    
                <Canvas Width="16" Height="16" Name="Minimize" Mouse.MouseLeave="Minimize_MouseEnter" Mouse.MouseEnter="Minimize_MouseEnter" MouseLeftButtonUp="Minimize_MouseLeftButtonUp">
                        <Rectangle Width="16" Height="16">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="#00FFFFFF" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle Panel.ZIndex="0" Margin="0,13,0,0" Width="12" Height="2" Name="MinimizeIcon">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="#90FFFFFF" />
                            </Rectangle.Fill>
                        </Rectangle>
                    </Canvas>
                <Canvas Width="16" Height="16" MouseEnter="Canvas_MouseEnter" MouseLeave="Canvas_MouseEnter" MouseLeftButtonUp="Canvas_MouseLeftButtonUp">
                        <Rectangle Width="16" Height="16">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="#00FFFFFF" />
                            </Rectangle.Fill>
                        </Rectangle>
                    <Rectangle Name="Restore1" Stroke="#90FFFFFF" StrokeThickness="1" Height="7" Width="7" Canvas.Top="7" Canvas.Left="2"/>
                    <Rectangle Name="Restore2" Stroke="#90FFFFFF" StrokeThickness="1" Height="7" Width="7" Canvas.Top="4" Canvas.Left="6" />
                </Canvas>
                <Canvas Width="16" Height="16" MouseEnter="Close_MouseEnter" MouseLeave="Close_MouseEnter" MouseLeftButtonDown="Close_MouseLeftButtonDown">
                        <Rectangle Width="16" Height="16">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="#00FFFFFF" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Polygon Name="ClosePol1" Stroke="#90FFFFFF"  StrokeThickness="1" Height="16" Width="16" Points="4,4 11,11"  />
                    <Polygon Name="ClosePol2" Stroke="#90FFFFFF"  StrokeThickness="1" Height="16" Width="16" Points="4,11 11,4"  />
                </Canvas>
                    </StackPanel>
            </DockPanel>

            <!--Constraints-->
            <DockPanel Grid.Column="0" Grid.Row="1">
                <Border Margin="4,4,4,4" CornerRadius="4,4,4,4">
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.504,1.5" StartPoint="0.504,0.03">
                            <GradientStop Color="LightGray"  Offset="0"/>
                            <GradientStop Color="#FFcccccc" Offset="0.567"/>
                        </LinearGradientBrush>
                    </Border.Background>


                    <DockPanel>
                        <StackPanel DockPanel.Dock="Top" Orientation="Vertical" >
                            <Label Content="Constraints" FontSize="14"></Label>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal"  DockPanel.Dock="Top" >
                            <Label Content="Value in pixels" FontSize="14"></Label>
                            <TextBox xmlns:TextBoxService.IsNumericOnly="True" Name="TB_ConstraintValue" Width="78" Height="22" VerticalAlignment="Top" Margin="0,4,0,0" Text="{Binding Path=ConstraintValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" >
                            </TextBox>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal"  DockPanel.Dock="Top" >
                            <Label Content="Type" FontSize="14"></Label>
                            <ComboBox Name="CB_ConstraintType" Width="60" Height="22" VerticalAlignment="Top" Margin="0,4,0,0">

                            </ComboBox>
                        </StackPanel>
                        <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" >
                            <Label Content="Minutes between change" FontSize="14"></Label>
                            <TextBox xmlns:TextBoxService.IsNumericOnly="True" Name="TB_TimerValue" Width="78" Height="22" VerticalAlignment="Top" Margin="0,4,0,0" Text="{Binding Path=TimerValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
                        </StackPanel>
                    </DockPanel>



                </Border>
            </DockPanel>

            <DockPanel Grid.Column="0" Grid.Row="2">
                <Border Margin="4,4,4,4" CornerRadius="4,4,4,4">
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.504,1.5" StartPoint="0.504,0.03">
                            <GradientStop Color="LightGray"  Offset="0"/>
                            <GradientStop Color="#FFcccccc" Offset="0.567"/>
                        </LinearGradientBrush>
                    </Border.Background>


                    <DockPanel>
                        <DockPanel Height="30" DockPanel.Dock="Top">
                            <Label Content="Directories" FontSize="14"></Label>
                            <CheckBox Height="16" IsChecked="{Binding Path=UseSubdirectories, Mode=TwoWay}" Name="CB_usesubdirectories" Width="120" Margin="50,0,0,0">Use subdirectories</CheckBox>
                            <Button Name="AddInput" HorizontalAlignment="Right" Margin="0,4,4,0" Click="AddInput_Click">Add directory</Button>
                        </DockPanel>

                        <StackPanel Orientation="Horizontal"  DockPanel.Dock="Top" HorizontalAlignment="Center">
                            <ListView Name="Inputs" Width="400" Height="80">
                            </ListView>
                        </StackPanel>
                    </DockPanel>



                </Border>
            </DockPanel>
            <DockPanel Grid.Column="0" Grid.Row="3">
                <DockPanel Height="30" DockPanel.Dock="Top">
                    <Button Name="Remove_Input" HorizontalAlignment="Left" Margin="10,0,0,0" Click="Remove_Input_Click">Remove Directory</Button>
                    <Button Name="Start" HorizontalAlignment="Right" Margin="0,0,10,0" Width="58" Click="Start_Click">Start</Button>
                </DockPanel>
            </DockPanel>

        </Grid>
    </Grid>
</Window>
